#pragma once

#include <QObject>
#include <QPointer>

class FeatureShape;
class ShapeOperation;

class QShapeVersion  : public QObject
{
	Q_OBJECT

	friend class HistoryManager;
	friend class ExpressionManager;
public:
	QShapeVersion(QObject *parent = nullptr);
	~QShapeVersion();

	uint GetVersionID() const
	{
		return m_versionID;
	}
private:

	// 上一版本的所有Shape----方便回溯
	std::vector<std::shared_ptr<FeatureShape>> m_featureShapes;

	// 这个版本所执行的operation
	ShapeOperation* m_operation;

	uint m_versionID;
};

// 注册元类型
Q_DECLARE_METATYPE(QPointer<QShapeVersion>)